package observermode;

import java.util.Observable;

/**
 * @author lzy
 * @version v1.0
 * Create DateTime: 2019/2/19 9:51
 */
public class Teacher extends Observable {

    private String name;

    public Teacher(String name) {
        this.name = name;
    }

    public void setHomework(String info) {
        System.out.println(name + "布置的作业是：" + info);
        super.setChanged();
        notifyObservers(info);
    }

}
